module.exports = function(app,passport) {
	var site = require('./site');
	var user = require('./user');
	var room = require('./room');
//site
	app.get('/',site.index);
	

//user
	app.get('/user',user.list);
	app.get('/user/signup',user.signup);
	app.post('/user/signup',user.save);
	app.get('/user/login',user.login);
	app.get('/user/profile',user.isLoggedIn,user.profile);
	app.get('/user/logout',user.logout);
	//app.post('/user/login',user.authen);

	app.post('/user/login', passport.authenticate('local-login', {
		successRedirect : '/user/profile', // redirect to the secure profile section
		failureRedirect : '/user/login', // redirect back to the signup page if there is an error
		failureFlash : true // allow flash messages
	}));

// room
	//app.get('/chat',user.isLoggedIn,room.chat);
	
}